cmake_minimum_required(VERSION 3.0.2)
project(depth_to_pointcloud)

## 查找 catkin 包
find_package(catkin REQUIRED COMPONENTS
    roscpp
    cv_bridge
    sensor_msgs
    pcl_conversions
    pcl_ros
)

## 查找 PCL 库
find_package(PCL REQUIRED)

catkin_package()

## 包含头文件目录
include_directories(
    include
    ${catkin_INCLUDE_DIRS}
    ${PCL_INCLUDE_DIRS}
)

## 添加可执行文件
add_executable(depth_to_pointcloud_node src/depth_to_pointcloud.cpp)

## 链接库文件
target_link_libraries(depth_to_pointcloud_node
    ${catkin_LIBRARIES}
    ${PCL_LIBRARIES}
)

# ## 安装配置（可选）
# install(TARGETS depth_to_pointcloud
#     RUNTIME DESTINATION ${CATKIN_PACKAGE_BIN_DESTINATION}
# )